Skip to content

feat(dashboard): account burn rate card with settings toggle#218

Open
mws-weekend-projects wants to merge 1 commit intoSoju06:mainfrom
mws-weekend-projects:pr/account-burnrate-squash
Open

feat(dashboard): account burn rate card with settings toggle#218
mws-weekend-projects wants to merge 1 commit intoSoju06:mainfrom
mws-weekend-projects:pr/account-burnrate-squash

Conversation

@mws-weekend-projects
Copy link
Copy Markdown
Contributor

The burn rate shows how fast your Plus accounts are currently being consumed:

  • Primary (5h): How many account-equivalents you’re burning per 5-hour window.
  • Secondary (7d): How many account-equivalents you’re burning per 7-day window.

Example: Primary 0.5 · Secondary 1.7 means:

  • you’re currently consuming about 0.5 accounts in the 5-hour window

  • and about 1.7 accounts over 7 days (projected from current pace).

  • add Account burn rate chart/stat between Cost and Error rate

  • add Appearance setting to toggle chart visibility (default on)

- add Account burn rate chart/stat between Cost and Error rate

- add Appearance setting to toggle chart visibility (default on)

- improve burn calculation fallback/projection and quota_exceeded handling

- include legacy settings schema compatibility defaults
@Soju06
Copy link
Copy Markdown
Owner

Soju06 commented Mar 26, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: acb9aa6fdc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +293 to +297
if (windowKey === "secondary") {
if (isFiniteNumber(fallbackProjectedEquivalent)) {
return clampBurnEquivalent(
burnEquivalent === null ? fallbackProjectedEquivalent : Math.max(burnEquivalent, fallbackProjectedEquivalent),
maxEquivalent,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Apply projected fallback to primary burn-rate calc

The primary burn-rate path never applies the projection fallback that you added for secondary, so it can materially under-report burn whenever the 5h window is already partially consumed. In plusAccountsBurnEquivalent, burnEquivalent is derived from remainingCredits * burnRate / capacity (future burn only), and the max(..., fallbackProjectedEquivalent) correction is gated to windowKey === "secondary"; e.g., at 50% used with burnRate=1, the card shows 0.5 for primary even though projected full-window consumption is 1.0. This affects dashboards with active primary depletion data and can mislead operators about current burn pace.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants